package com.huadi.ssm.service;

import com.huadi.ssm.mapper.AdminMapper;
import com.huadi.ssm.po.Admin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class AdminServiceImpl implements AdminService {

    @Autowired
    private AdminMapper adminMapper;

    @Override
    public Admin findByName(String name) {
        return adminMapper.findByName(name);
    }

    @Override
    public int add(Admin admin) {
        return adminMapper.add(admin);
    }

    @Override
    public int edit(Admin admin) {
        return adminMapper.edit(admin);
    }

    @Override
    public int delete(String ids) {
        return adminMapper.delete(ids);
    }

    @Override
    public List<Admin> findList(Map<String, Object> queryMap) {
        return adminMapper.findList(queryMap);
    }

    @Override
    public int getTotal(Map<String, Object> queryMap) {
        return adminMapper.getTotal(queryMap);
    }
}
